-
-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CLI Interface for fake-rs #209
Conversation
Hi @cksac, Gave a pr for CLI implementation. Let me know if the code design is good and I'll implement for other fake generators. currently it supports
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me, thx
❯ ./fake
An easy to use library and command line for generating fake data like name, number, address, lorem, dates, etc.
Usage: fake [OPTIONS] [COMMAND]
Commands:
CityPrefix
CitySuffix
CityName
CountryName
CountryCode
StreetSuffix
StreetName
TimeZone
StateName
StateAbbr
SecondaryAddressType
SecondaryAddress
ZipCode
PostCode
BuildingNumber
Latitude
Longitude
Geohash
Isbn
Isbn10
Isbn13
CreditCardNumber
CompanySuffix
CompanyName
Buzzword
BuzzwordMiddle
BuzzwordTail
CatchPhrase
BsVerb
BsAdj
BsNoun
Bs
Profession
Industry
FreeEmailProvider
DomainSuffix
FreeEmail
SafeEmail
Username
Password
IPv4
IPv6
IP
MACAddress
UserAgent
Seniority
Field
Position
Word
Words
Sentence
Sentences
Paragraph
Paragraphs
FirstName
LastName
Title
Suffix
Name
NameWithTitle
PhoneNumber
CellNumber
FilePath
FileName
FileExtension
DirPath
MimeType
Semver
SemverStable
SemverUnstable
CurrencyCode
CurrencyName
CurrencySymbol
Bic
Isin
help Print this message or the help of the given subcommand(s)
Options:
-r, --repeat <repeat> [default: 1]
-l, --locale <locale> [default: EN]
-h, --help Print help
-V, --version Print version Now it supports many subcommands, still there are few pending that are bit tricky to expand them in macros.
I'll try to add remaining too in a while but for now will take a break. You can merge if everything looks good. |
This Pr powers fake-rs to generate fake data from CLI.
Features:
Below are few examples:
❯ ./fake Name Generating 1 fakes for EN locale Theresa Walker
❯ ./fake -r5 -lzh_cn Name Generating 5 fakes for ZH_CN locale 何丹华 尹雅瑾 于金福 郭雨珍 龙菲霞
❯ ./fake -r5 Password --min 10 Generating 5 fakes for EN locale Q6eeXHfC3uzSRqtZwB 6fDHAOh3I7Ah77duLL R8ygoTLmd4i1z1Z 5Uxj3RdEK5O4Af3ow 2XWsGT0lUaDnMZTb7
Arguments can be sent to fake generators like password that accept different ranges